"use client"


import { usePathname } from "next/navigation"
import { SidebarProvider } from "@/components/ui/sidebar"
import { DashboardSidebar } from "@/components/dashboard-sidebar"

export default function DashboardLayout({
  children,
}: Readonly<{
  children: React.ReactNode
}>) {
  const pathname = usePathname()
  const isAIAssistantPage = pathname === "/dashboard/ai-assistant"

  return (
    <SidebarProvider>
      <div className="flex h-screen">
        <DashboardSidebar />
        <main className={`flex-1 ${isAIAssistantPage ? 'p-0 flex flex-col' : 'p-6'}`}>
          {children}
        </main>
      </div>
    </SidebarProvider>
  )
}